#pragma once
#include <DirectXMath.h>
#include <Windows.h>
#include <d3d11.h>
#include "IComponent.h"

using namespace DirectX;

class Camera : virtual public IComponent
{
public:
	Camera(void);
	~Camera(void);

	virtual void Initialize(HWND WindowHandle = nullptr, HINSTANCE hInstance = nullptr, ID3D11Device* D3DDevice = nullptr, ID3D11DeviceContext* D3DDeviceContext = nullptr);
	virtual void Update(int DeltaTime);
	virtual void Shutdown();

	void MoveLeft();
	void MoveRight();
	void MoveForward();
	void MoveBackwards();

	void RotateLeft();
	void RotateRight();

	DirectX::XMMATRIX GetProjectionMatrix();
	DirectX::XMMATRIX GetViewMatrix();
	DirectX::XMMATRIX GetWorldMatrix();

private:
	DirectX::XMMATRIX World;
	DirectX::XMMATRIX View;
	DirectX::XMMATRIX Projection;
	float CameraRotationHorizontal;
	float CameraRotationVertical;

	DirectX::XMVECTOR Eye;
	DirectX::XMVECTOR At;
	DirectX::XMVECTOR Up;

	float x;
	float z;
};

